package com.tyk.bookstore.front.member.model.query;


import com.tyk.bookstore.front.common.core.model.enume.Gender;
import com.tyk.bookstore.front.member.constant.MemberValidConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.time.LocalDateTime;


@Data
public class MemberUpdateQuery {

    @Schema(description = "用户名")
    @NotBlank
    @Size(min = MemberValidConstant.NICKNAME_MIN_LENGTH, max = MemberValidConstant.NICKNAME_MAX_LENGTH)
    @Pattern(regexp = MemberValidConstant.NICKNAME_REGEXP)
    private String nickname;

    @NotNull
    @Schema(description = "性别[0男，1女，2保密]")
    private Gender gender;

    @NotNull
    @Schema(description = "生日")
    private LocalDateTime birthday;
}
